<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta name="GENERATOR" content="Quadralay WebWorks Publisher Professional Edition 7.0.2.1206" />
    <meta name="TEMPLATEBASE" content="book-w-index" />
    <meta name="LASTUPDATED" content="10/29/02 14:46:24" />
    <title>Code Samples</title>
    <link rel="StyleSheet" href="document.css" type="text/css" />
    <link rel="StyleSheet" href="catalog.css" type="text/css" />
    <link rel="Table of Contents" href="index.html" />
    <link rel="Previous" href="midletsLOF.html" />
    <link rel="Next" href="preface.html" />
    <link rel="Index" href="midletsIX.html" />
  </head>

  <body>

    <table class="full-width" id="SummaryNotReq1">
      <tr><td class="sun-darkblue">&#160;</td></tr>
      <tr><td class="sun-lightblue">&#160;</td></tr>
      <tr><td class="go-right">
        <a accesskey="c" href="index.html">
          <img id="LongDescNotReq1" src="images/toc.gif" border="0"
            alt="Contents" /></a>
	<a accesskey="p" href="midletsLOF.html">
	  <img id="LongDescNotReq2" src="images/prev.gif" border="0"
            alt="Previous" /></a>
        <a accesskey="n" href="preface.html">
	  <img id="LongDescNotReq3" src="images/next.gif" border="0"
            alt="Next" /></a>
        <a accesskey="i" href="midletsIX.html">
	  <img id="LongDescNotReq4" src="images/index.gif" border="0"
            alt="Index" /></a>
        </td>
      </tr>
    </table>

<a name="wp259"> </a><h2 class="pNewHTMLPage">
Code Samples
</h2>
<hr class="pHr"/>
<a name="wp13819"> </a><p class="pTOC2">
<a href="create.html#wp1001603"> CODE EXAMPLE 1  Imports and Initial Class Definition for HelloMIDlet</a>
</p>
<a name="wp13821"> </a><p class="pTOC2">
<a href="create.html#wp1001608"> CODE EXAMPLE 2  Constructor for HelloMIDlet</a>
</p>
<a name="wp13823"> </a><p class="pTOC2">
<a href="create.html#wp1001616"> CODE EXAMPLE 3  Fields of HelloMIDlet</a>
</p>
<a name="wp13825"> </a><p class="pTOC2">
<a href="create.html#wp1001612"> CODE EXAMPLE 4  The commandAction Method of HelloMIDlet</a>
</p>
<a name="wp13827"> </a><p class="pTOC2">
<a href="create.html#wp1001626"> CODE EXAMPLE 5  Life Cycle Methods of HelloMIDlet</a>
</p>
<a name="wp13829"> </a><p class="pTOC2">
<a href="appx-helloworld.html#wp998124"> CODE EXAMPLE 6  Full Hello MIDlet Source Code</a>
</p>

    <p>&#160;</p>
    <hr class="pHr" />

    <table class="full-width" id="SummaryNotReq2">
      <tr>
        <td class="go-left">
          <a accesskey="c" href="index.html">
	    <img id="LongDescNotReq1" src="images/toc.gif" border="0"
              alt="Contents" /></a>
	  <a accesskey="p" href="midletsLOF.html">
	    <img id="LongDescNotReq2" src="images/prev.gif" border="0"
              alt="Previous" /></a>
	  <a accesskey="n" href="preface.html">
	    <img id="LongDescNotReq3" src="images/next.gif" border="0"
              alt="Next" /></a>
	  <a accesskey="i" href="midletsIX.html">
	    <img id="LongDescNotReq4" src="images/index.gif" border="0"
              alt="Index" /></a>
        </td>
        <td class="go-right">
          <span class="copyright">Creating MIDlet Suites <br /> MIDP Reference Implementation, Version 2.0 FCS</span>
        </td>
      </tr>
    </table>

    <p>&#160;</p>
    <p class="copyright"><a 
       href="copyright.html">Copyright</a> &#169;
       2002 Sun Microsystems, Inc. All rights reserved.</p>	
  </body>
</html>
